home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / ZTIMER11.ARJ / MOVTST2.ASM < prev    next >
Assembly Source File  |  1992-01-27  |  577b  |  32 lines

  1. ; Sample code to measure the performance of 200000 loads of AL from
  2. ; memory. Use by renaming to TESTCODE, which is included in LZTEST.ASM.
  3. ; LZTIME.BAT does this, along with assembling and linking the code. This
  4. ; piece of code WILL overflow the precision timer - even on my 486/33
  5. ; machine!
  6.  
  7.         jmp     Skip                ; Jump around any defined data
  8.  
  9. MemVar  db      ?
  10.  
  11. Skip:
  12.  
  13. ; Start timing
  14.  
  15.         call    ZTimerOn
  16.  
  17.         mov     cx,2000
  18. @@Loop:
  19.         rept    10000
  20.         mov        al,[MemVar]
  21.         endm
  22.         dec     cx
  23.         jz        @@Done
  24.         jmp     @@Loop
  25.  
  26. @@Done:
  27.  
  28. ; Stop timing
  29.  
  30.         call    ZTimerOff
  31.  
  32.